package com.gitee.chili.leisure.domain;

import com.gitee.chili.leisure.base.GenerateId;
import com.gitee.chili.leisure.enums.Status;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Account
 *
 * @author week solider
 * @since 2020.09.01
 */
@Data
@Entity
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class Account extends GenerateId<Long> {

    @Column(name = "member_id")
    private Long memberId;

    /**
     * 币种信息
     */
    @OneToOne
    @JoinColumn(name = "currency_id")
    private Currency currency;

    private BigDecimal balance;

    @Column(name = "freeze_money")
    private BigDecimal freezeMoney;

    @Column(name = "status")
    private Status status;

}
